const { Form, Select, Input, Button ,Radio} = antd;
const { Option } = Select;
const CollectionCreateForm = Form.create({})(
  class extends React.Component {
    componentWillMount () {
     
     }

    render() {
      const { visible, onCancel, onCreate, form,title,initData} = this.props;
      const { getFieldDecorator } = form;
      return (
        <Modal
          visible={visible}
          title={title}
          okText="ok"
          onCancel={onCancel}
          onOk={onCreate}
        >
        <Form onSubmit={this.handleSubmit}>
        <Form.Item label="父id">
          {getFieldDecorator('parent_id', {
            initialValue:initData.parent_id
          })(<Input disabled />)}
        </Form.Item>
        <Form.Item label="id">
          {getFieldDecorator('id', {
           initialValue:initData.id
          })(<Input disabled />)}
        </Form.Item>
        <Form.Item label="名称">
          {getFieldDecorator('name', {
            initialValue:initData.name,
            rules: [{ required: true, message: 'Please input your note!' }],
          })(<Input />)}
        </Form.Item>
        <Form.Item label="资源地址">
          {getFieldDecorator('res_url', {
            initialValue:initData.res_url,
            rules: [{ required: true, message: 'Please input your note!' }],
          })(<Input />)}
        </Form.Item>
        <Form.Item label="图片地址">
          {getFieldDecorator('img_url', {
            initialValue:initData.img_url,
            rules: [{ required: true, message: 'Please input your note!' }],
          })(<Input />)}
        </Form.Item>
        <Form.Item label="描述">
          {getFieldDecorator('description', {
            initialValue:initData.description,
            rules: [{ required: true, message: 'Please input your note!' }],
          })(<Input />)}
        </Form.Item>
        <Form.Item label="载荷">
          {getFieldDecorator('payload', {
             initialValue:initData.payload,
            rules: [{ required: true, message: 'Please input your note!' }],
          })(<Input />)}
        </Form.Item>
      </Form>
        </Modal>
      );
    }
  },
);

